package com.spikegpsongoogleappengine;

import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.facebook.android.Facebook;
import com.spikegpsongoogleappengine.fb.FacebookHelper;
import com.spikegpsongoogleappengine.fb.PostToWallButton;

public class SpecificCompanyInfoInteraction extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_specific_company_info_interaction);

		LinearLayout layout = (LinearLayout) findViewById(R.id.specificCompanyRelative);

		PostToWallButton buyButton = new PostToWallButton(this);
		buyButton.setImageDrawable(getResources().getDrawable(
				R.drawable.facebook_icon));

		TextView tX = new TextView(getApplicationContext());

		tX.setText("fnuk");

		// buyButton.setText("fb");
		// buyButton.setLayoutParams( (new LayoutParams(
		// ViewGroup.LayoutParams.WRAP_CONTENT,
		// ViewGroup.LayoutParams.WRAP_CONTENT));

		layout.addView(buyButton);

		layout.addView(tX);

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(
				R.menu.activity_specific_company_info_interaction, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// switch (item.getItemId()) {
		// case android.R.id.home:
		NavUtils.navigateUpFromSameTask(this);
		// return true;
		// }
		return super.onOptionsItemSelected(item);
	}

	public void shareOnFacebook(View v) {

		Toast.makeText(getApplicationContext(), "share", Toast.LENGTH_SHORT)
				.show();

	}

}
